#include "Lidar.h"
#include <iostream>
#include <iomanip>

Lidar::Lidar() : channels(0), range(0), power(0) {}

Lidar::Lidar(const std::string& model, int channels, double range, double power)
    : model(model), channels(channels), range(range), power(power) {}

// Getters
std::string Lidar::getModel() const { return model; }
int Lidar::getChannels() const { return channels; }
double Lidar::getRange() const { return range; }
double Lidar::getPower() const { return power; }

// Setters
void Lidar::setModel(const std::string& model) { this->model = model; }
void Lidar::setChannels(int channels) { this->channels = channels; }
void Lidar::setRange(double range) { this->range = range; }
void Lidar::setPower(double power) { this->power = power; }

void Lidar::display() const {
    std::cout << "多线激光雷达信息:" << std::endl;
    std::cout << "  型号: " << model << std::endl;
    std::cout << "  通道数: " << channels << std::endl;
    std::cout << "  测试范围: " << range << "m" << std::endl;
    std::cout << "  功耗: " << power << "W" << std::endl;
}